{% load static %}
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="csrf-token" content="">
    <script src="{% static 'js/bootstrap.min.js' %}"></script>
    <script src="{% static 'js/jquery-3.7.1.min.js' %}"></script>
    <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'css/MyLife_CSS.css' %}">
    <link rel="icon" href="{% static 'images/logo.png' %}">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {% block head %}

    {% endblock %}
    <title>
        {% block title %}
        社交模块
        {% endblock %}
    </title>
</head>

<body>
    <nav class="navbar navbar-expand-lg fixed-top navbar-light">
        <a href="#" class="btn btn-lg" onclick="goBack()">返回</a>
        <a href="/">
            <img src="{% static 'images/logo.png' %}" alt="header-Logo" height="120px"></a>
        {% if username %}
        <a href={% url 'view_likes' username %}>收到的赞</a>
        <a href={% url 'view_posts' username %}>朋友圈</a>
        <a href="{% url 'edit_profile' username %}">编辑页面</a>
        <a href={% url 'friend_messages' username %}>查看好友留言</a>
        <a href="{% url 'manage_profile' username %}">好友管理</a>
        <a href="{% url 'logout_user' %}" onclick="return confirm('是否退出登录？')">退出登录</a>
        {% endif %}
    </nav>
    <br><br> <!--添加换行，避免导航栏覆盖页面的首行内容 -->
    {% block body %}

    {% endblock %}
    <script>
        function goBack() {
            window.history.back();
        }
        function openPopup(event) {
            // 获取弹出窗口元素
            var popup = document.getElementById("popup");

            // 设置弹出窗口的位置
            popup.style.display = "block";
            popup.style.left = event.clientX + "px";
            popup.style.top = event.clientY + "px";
        }

        function closePopup() {
            // 获取弹出窗口元素
            var popup = document.getElementById("popup");

            // 隐藏弹出窗口
            popup.style.display = "none";
        }
    </script>
</body>

</html>